package com.example.warehouse_manager.service.impl;

import com.example.warehouse_manager.entity.Brand;
import com.example.warehouse_manager.mapper.BrandMapper;
import com.example.warehouse_manager.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Yang
* @description 针对表【brand(品牌)】的数据库操作Service实现
* @createDate 2024-03-22 14:02:27
*/
//@CacheConfig(cacheNames = "com.example.warehouse_manager.service.impl.BrandServiceImpl")
@Service
public class BrandServiceImpl implements BrandService{

    @Autowired
    private BrandMapper brandMapper;


    //查询所有品牌
    //@Cacheable(key = "'all:brand'")
    @Override
    public List<Brand> queryAllBrand() {
        return brandMapper.findAllBrnad();
    }
}
